<?php
require_once("/home/bluecbhv/Jcuhelpers-WebTech/Common/Helpers/Constants.php");

require_once("/home/bluecbhv/Jcuhelpers-WebTech/Common/Algorithms/Content_Scraper.php");
require_once("/home/bluecbhv/Jcuhelpers-WebTech/Common/Algorithms/JSON_Decoder.php");
require_once("/home/bluecbhv/Jcuhelpers-WebTech/Google_Custom_Search/Algorithms/Decoded_JSON_Data_Filter.php");
require_once("/home/bluecbhv/Jcuhelpers-WebTech/Google_Custom_Search/Algorithms/New_JSON_File_Creation.php");

/***********************************************
	This class would create a list of Google
	custom search results related to the
	keyword "Web Design Trends".
************************************************/
class GoogleCustomSearch {
	private $scrapedContent = NULL;
	private $decodedJSONData = NULL;
	
	private $jsonDataToBeSaved = NULL;
	private $newJSONFile = NULL;
	
	/************************************************************/
	
	function __construct() {
		$csObj = new ContentScraper();
		$this->scrapedContent = $csObj->scrapeContent(GOOGLE_CS_API_URL);
		
		$jdObj = new JSONDecoder();
		$this->decodedJSONData = $jdObj->decodeJSONData($this->scrapedContent);
				
		$djdfObj = new DecodedJSONDataFilter();
		$this->jsonDataToBeSaved = $djdfObj->filterDecodedJSONData($this->decodedJSONData);
		
		$this->newJSONFile = new NewJSONFileCreation($this->jsonDataToBeSaved);
	}
}
?>